package entidades;

import java.util.List;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
//Registra o nome, email e as visualizações da JSP pelos usuários para controlar a cota mensal de pageviews
@PersistenceCapable
public class Usuarios {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
	private String Skey_nickname;
	@Persistent
	@Extension(vendorName="datanucleus", key="gae.pk-name", value="true")
	private String nickname;
    @Persistent
    private String email;
    @Persistent
    private List<Visitas> visitas;
	public Usuarios(String Skey_nickname, String nickname, String email){
		this.Skey_nickname=Skey_nickname;
		this.nickname=nickname;
		this.email=email;
	}
  	public void setVisita(Visitas visita){
    	this.visitas.add(visita);
    }
}
